import { Card } from 'antd';
import { useModel } from 'umi';
import PersonSettingModal from './PersonSettingModal';

const Setting: React.FC = () => {
  const { user, run } = useModel('userModel');
  const { email, mobile } = user || {};

  return (
    <div className="setting">
      <Card
        bordered={false}
        styles={{
          body: {
            padding: '66px 32px  87px',
          },
        }}
        style={{ minHeight: '50vh', borderRadius: '0 0 8px 8px' }}
      >
        <PersonSettingModal
          handleOk={() => {
            run();
          }}
          data={{ email, phone: mobile }}
        />
      </Card>
    </div>
  );
};

export default Setting;
